/**
 * 过虑条件
 */
'use strict'
import {Button, Flex} from 'antd-mobile';
import {connect} from 'dva';
import React, {Component} from 'react';
import style from './BookClass.less';

class Filter extends Component {
  render() {
    const {open} = this.props;
    return (
      <div>
        <Flex justify="center">
          <Button className={open ? style.leftBtnActive : style.leftBtn} onClick={this.open}
                  type="primary">筛选老师</Button>
          <Button className={style.rightBtn}>咨询</Button>
        </Flex>
      </div>
    );
  }

  open = _ => this.props.dispatch({type: 'book/filterVisible'});
}

Filter.propTypes = {};


export default connect()(Filter);
